<?php
namespace app\admin\model;

use think\Model;
use think\Db;

class User extends Model
{
     // 用户列表 
    public function userlist() 
    {
        $list = DB::name('admin')->select();
        return $list;
    }
    public function delUser($id)
    {
        $del = Admin::destroy($id);
        return $del;
    }
    public function updateUser($info)
    {
        var_dump($info);
        $user = [
            'username' => $info['username'],
        ];
        // var_dump($user);
        $update = DB::name('admin')->where('id = '. $info['id'])->update($user);
        return $update;
    }
}